import { request } from "@/utils/request.js"



// api地址
const api = {
    register: '/fuint-application/clientApi/sign/register',
    login: '/fuint-application/clientApi/sign/signIn',
    mpWxLogin: '/fuint-application/clientApi/sign/mpWxLogin',
    mpWxLoginN: '/fuint-application/clientApi/sign/mpWxLoginN',
    mpWxAuth: '/fuint-application/clientApi/sign/mpWxAuth',
    captcha: '/fuint-application/clientApi/captcha/getCode',
    sendSmsCaptcha: '/fuint-application/clientApi/sms/sendVerifyCode'
}

// 用户注册
export function register(data) {
    return request(api.register, "post" , data)
}

// 用户登录
export function apiLogin(data) {
	return request(api.login , "post" , data)
}

// 微信小程序快捷登录
export function mpWxLogin(data, option) {
	return request(api.mpWxLogin , "post" , data)
}

// 微信小程序快捷登录
export function mpWxLoginN(data, option) {
    // return request.post(api.mpWxLoginN, data, option)
}
// 微信公众号授权
export function mpWxAuth(data, option) {
    // return request.post(api.mpWxAuth, data, option)
}

// 图形验证码
export function apiGetCaptcha() {
    return request(api.captcha, "get")
}

// 发送短信验证码
export function sendSmsCaptcha(data) {
	return request(api.sendSmsCaptcha , "post" , data)
}
